<?php
require_once '../inc/configuration.php';
require_once '../inc/connexion_db.php';
require_once '../inc/fonctions_identification.php';
require_once '../inc/fonction_recherche.php';
proteger_page("utilisateur_id", CHEMIN);

if (isset($_POST['envoyer'])) {
if (isset($_POST['chercher']))  $qui  = $_POST['chercher'];
if (isset($_POST['liste_recherche']))  $ou = $_POST['liste_recherche'];
}
?>
<!DOCTYPE html>
        <style>
            .table {
                width: 500px;
            }
            
            th {
                width: 35%;
                text-align: right;
            }
        </style>
<html>
    <link href="../bootstrap/css/bootstrap.css" type="text/css" rel="stylesheet">
        <link href="../css/style.css" type="text/css" rel="stylesheet">
    
        
        <?php 
        require_once "../inc/css_js_bootstrap/css_js_bootstrap.php"; 
        require_once '../inc/menus/menu_principal.php';
         require_once '../inc/identite.php'; 
        ?>
 <br><div id="div2">
                <h3 style="margin-left:75px;">CHERCHER UN CONTACT</h3>
        <br>
        <?php
            ?><form action="" method="post"> 
            <table style="border:none;">
                <tr style="border:none;">
                    <td >&nbsp; Nom du contact &nbsp;</td>
                    <td><input type="text" name="chercher" id="chercher" value ="" placeholder="Recherche...">&nbsp;</td>
                </tr>
                <tr>
                     <td style="border-right: none;" > &nbsp;&nbsp;Dans &nbsp;</td>
                     <td><select name="liste_recherche" id="liste_recherche" style="width:168px;">
                        <option value="1">Contact</option>
                        <option value="2">Entreprise</option>
                        <option value="3">Rendez-vous</option>
                        <option value="4">Tous</option>
                         </select>&nbsp;</td>
                    <td style="border-left: none;">&nbsp;<input type="submit" name="envoyer" value="Chercher"></td>
                </tr>
             </table>
            </form>
           </div>   
        <?php
        recherche($qui, $ou);
        
        ?>
        
    </body>
</html>
      
